<a class="{% if not showDownLoadText|default(1)  %}color-primary{% else %} cd-btn {% endif %} mhs {{ exportClass|default('cd-btn-primary') }} js-export-btn"
   href="javascript:;"
   data-try-url="{{ path('try_export', {'name':exportFileName, 'limit': exportLimit|default('')}) }}"
   data-url="{{ path('export',{'name':exportFileName}) }}"
   data-pre-url="{{ path('pre_export',{'name':exportFileName}) }}"
   data-loading-text="{{'form.btn.export.submiting'|trans}}"
   data-target-form="#{{ targetFormId }}"
>
    <i class="es-icon es-icon-filedownload cd-text-sm"></i>
    {% if showDownLoadText|default(1) %}
      {{ text|default('form.btn.export')|trans }}
    {% endif %}
</a>

<div id="export-modal" class="hide">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" data-success="{{ 'file.download.finish'|trans }}">{{ 'file.download.start'|trans }}</h4>
            </div>
            <div class="modal-body">
                <div class="progress progress-striped active">
                    <div  id="progress-bar" class="progress-bar progress-bar-success" style="width: 0%"></div>
                </div>
            </div>
        </div>
    </div>
</div>

{% if exportWebpack|default() %}
    {% do script(['app/js/exporter/index.js']) %}
{% else %}
    {% do load_script('topxiaadminbundle/controller/export/export.js') %}
{% endif %}

